package com.zhigh.test.testuinit.sty.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.*;

import java.util.List;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@JacksonXmlRootElement(localName = "service")
public class ESBMessage {

    @JacksonXmlProperty(isAttribute = true)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String name;

    @JacksonXmlProperty(localName = "sys-header")
    private ESBContent<ESBObjectData> sysHeader;

    @JacksonXmlProperty(localName = "app-header")
    private ESBContent<ESBObjectData> appHeader;

    @JacksonXmlProperty(localName = "local-header")
    private ESBContent<ESBObjectData> localHeader;

    @JacksonXmlProperty(localName = "data")
    @JacksonXmlElementWrapper(localName = "body")
    private List<ESBField> body;
}
